import 'package:boss/ui/page/tableManagement/page/areaManagement/page/areaDetail/provider/area_detail_provider.dart';
import 'package:boss/ui/widget/form/base_text_form_field.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class AreaDetailContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: SingleChildScrollView(
        padding: EdgeInsets.symmetric(
          horizontal: 30.w,
        ),
        child: Column(
          children: <Widget>[
            Consumer<AreaDetailProvider>(
              builder: (context, areaDetailProvider, _) {
                return BaseTextFormField(
                  prefixText: '区域名称',
                  hintText: '例如：大厅',
                  initialValue: areaDetailProvider.storeArea.areaName ?? '',
                  onChanged: (value) {
                    areaDetailProvider.setStoreAreaName(value);
                  },
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
